import java.util.Arrays;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        //这里要用root来接收,且类型要注意
        BinaryTree.TreeNode root = binaryTree.createTree();

        binaryTree.preOrder(root);
//        binaryTree.preOrder1(root);

//        System.out.println();
//        System.out.println("========");
////        List<Character> ret=binaryTree.preorderTraversal(root);
//        List<Character> ret1=binaryTree.preorderTraversal2(root);
////        System.out.print(ret);
//        System.out.println(ret1);
//        System.out.println();
//        binaryTree.inOrder(root);
//        System.out.println();
//        binaryTree.size(root);
//        System.out.println(BinaryTree.nodeSize);
//        System.out.println("=======");
//        System.out.println(binaryTree.size2(root));
//        binaryTree.getLeafNodeCount(root);
//        System.out.println(BinaryTree.leafSize);
//        System.out.println("======");
//        int sum=binaryTree.getLeafNodeCount2(root);
//        System.out.println(sum);
//        System.out.println("============");
//        int q=binaryTree.getKLevelNodeCount(root,3);
//        System.out.println(q);
//        System.out.println("========");
//        int b=binaryTree.getHeight(root);
//        System.out.println(b);
//        System.out.println("=====");
//        BinaryTree.TreeNode m=binaryTree.findVal(root,'E');
//        System.out.println(m.val);


//        binaryTree.inOrder(root);
//        System.out.println();
//
//        binaryTree.postOrder(root);
//        System.out.println();
//
//        //binaryTree.size(root);
//        binaryTree.getLeafNodeCount(root);
//        System.out.println("节点的个数: "+ binaryTree.size2(root));
//        //System.out.println("叶子节点的个数: "+ BinaryTree.leafSize);
//        System.out.println("叶子节点的个数: "+ binaryTree.getLeafNodeCount2(root));
//        System.out.println("第K层节点的个数: "+ binaryTree.getKLevelNodeCount(root,4));
//        int ret = binaryTree.getHeight(root);
//        System.out.println("树的高度为："+ret);
//
//        BinaryTree.TreeNode ret2 = binaryTree.findVal(root,'D');
//        System.out.println(ret2.val);
    }
}
